/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.test;

import cn.dev33.satoken.stp.StpLogic;
import cn.dev33.satoken.stp.StpUtil;
import com.comac.ins.common.json.utils.JsonUtils;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;


@SpringBootTest
public class TokenTest {

    @Test
    private void test(){
        String token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJzeXNfdXNlcjoxIiwicm5TdHIiOiJkYlkwRWpCdTh3bW9HbmcyYU5WRExyRmZhUkozbTRmbyIsImNsaWVudGlkIjoiZTVjZDdlNDg5MWJmOTVkMWQxOTIwNmNlMjRhN2IzMmUiLCJ0ZW5hbnRJZCI6IjAwMDAwMCIsInVzZXJJZCI6MSwidXNlck5hbWUiOiJhZG1pbiIsImRlcHRJZCI6MTAzLCJkZXB0TmFtZSI6IueglOWPkemDqOmXqCJ9.uD2WcqlJf0FTOQval-vh1p_Sf0pZ9NDlW1MCQkQTcpc";
        StpLogic stpLogic = StpUtil.getStpLogic();
        Object loginIdByToken = stpLogic.getLoginIdByToken(token);
        System.out.println(JsonUtils.toJsonString(loginIdByToken));
    }

}
